package com.mobvel.zxstdzgl.ui;

import java.util.Map;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.mobvel.zxstdzgl.R;

public class ArtListAdapter extends ClientAdpater {
	
//	private PreferencesHelper mHelper;
	private ViewHolder holder = null;

	public ArtListAdapter(Context context) {
		super(context);
//		mHelper = new PreferencesHelper(context);
	}
	
	public View getView(int position, View convertView, ViewGroup parent) {
		
		final Map<String, String> item=(Map<String, String>)data.get(position);
		if (convertView == null) {
			holder = new ViewHolder();
			convertView = inflater.inflate(R.layout.art_list_adapter, null);
			holder.tvSeq = (TextView) convertView.findViewById(R.id.tv_seq);
			holder.tvName = (TextView) convertView.findViewById(R.id.tv_catename);
			
			convertView.setTag(holder);

		} else {
			holder = (ViewHolder) convertView.getTag();
		}
		
		holder.tvSeq.setText(""+(position+1));
		
		String name = item.get("ArticleName");
		holder.tvName.setText(name);
		
		return convertView;
	}
	
	public final class ViewHolder {
		public TextView tvSeq;
		public TextView tvName;
	}
	
}
